//
//  ZDXAdditionalView.m
//  SuWenDianShang
//
//  Created by xue on 2018/2/22.
//  Copyright © 2018年 APPLE. All rights reserved.
//

#import "ZDXAdditionalView.h"

@implementation ZDXAdditionalView
- (IBAction)Click_btn:(id)sender {
    
    UIButton *btn =(UIButton*)sender;
    if (self.block) {
        self.block(btn.tag);
    }
    self.hidden =YES;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    UITapGestureRecognizer *myTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(didTapBackgroundView:)];
    [self addGestureRecognizer:myTap];
    
//    self.bottomView.backgroundColor =[UIColor colorWithWhite:0 alpha:0.8];
    self.bottomView.layer.cornerRadius=4;
    self.bottomView.clipsToBounds =YES;
    _up_sanjiao.constant =SafeAreaTopHeight;
    
    _label1.textColor =UIColorFromRGB(0x121212);
    _label2.textColor =UIColorFromRGB(0x121212);
    _label3.textColor =UIColorFromRGB(0x121212);
    _label4.textColor =UIColorFromRGB(0x121212);
}
- (void)didTapBackgroundView:(UITapGestureRecognizer *)sender {
    self.hidden =YES;
}

+ (instancetype)additionalView{
    NSString *className = NSStringFromClass([self class]);
    UINib *nib = [UINib nibWithNibName:className bundle:nil];
    return [nib instantiateWithOwner:nil options:nil].firstObject;
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
